﻿using System;

namespace AbstractFactoryPattern
{
    internal class ShapeFactory : IAbstractFactory
    {
        public IColor GetColor(string color)
        {
            throw new NotImplementedException();
        }

        public IShape GetShape(string shapeType)
        {
            if (shapeType == null)
            {
                return null;
            }
            else if (shapeType.Equals("RECTANGLE",StringComparison.CurrentCultureIgnoreCase))
            {
                return new Rectangle();
            }
            else if (shapeType.Equals("SQUARE", StringComparison.CurrentCultureIgnoreCase))
            {
                return new Square();
            }
            return null;
        }
    }
}
